/**
 * 
 */
package me.myachievements.web;

import me.myachievements.web.accessible.IndexPage;

import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
//
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author besseym
 *
 */
public class MyAchievementsApplication extends WebApplication {

	/**
	 * Constructor
	 */
	public MyAchievementsApplication() {
	}
	
	/**
	 * 
	 */
	public void init() {
        super.init();
        addComponentInstantiationListener(new SpringComponentInjector(this));
    }
	
	/*
	 * (non-Javadoc)
	 * @see org.apache.wicket.protocol.http.WebApplication#newSession(org.apache.wicket.Request, org.apache.wicket.Response)
	 */
	@Override 
	public Session newSession(Request request, Response response) {
		return new MyAchievementsSession(request);
	}

	/* (non-Javadoc)
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	public Class<IndexPage> getHomePage() {
		return IndexPage.class;
	}

}
